<extend name="Base/common"/>

<block name="body">
<title>{$user_info['username']} 的主页 - {:C('SITE_TITLE')}</title>

<div class="container">
<div class="row">

<div class="col-md-9">
  
<div class="page-header">
  <h1>{$user_info['username']} <small>的个人主页</small></h1>
</div>

<div class="panel panel-default">
  <div class="panel-body">
    <p><span class="badge">个人介绍</span> {$user_info['content']?$user_info['content']:'无'}</p>
  <p><?php echo $pagecon[0]['geqian']; ?></p>
  <hr>
  <p><span class="glyphicon glyphicon-user"></span>
  <if condition="$user_info['sex']">
  汉子
  <else />
  妹子
  </if>

  <span class="glyphicon glyphicon-calendar"> </span> {$user_info['birthday']}</p>

  </div>
  <div class="panel-footer text-right">
  <!--<p>共获得 <span class="glyphicon glyphicon-heart"></span> <b>{$user_info['love']}</b> 个赞</p>-->
  <if condition="$user_info['uid'] neq cookie('user_id')">
  <a href="{:U('/Home/Inboxpage/'.$user_info['uid'])}"><button class="btn btn-success"><span class="glyphicon glyphicon-envelope"></span> 私信TA</button></a>
  <else />
  <button class="btn btn-success disabled"><span class="glyphicon glyphicon-envelope"></span> 我自己</button>
  </if>
  </div>
</div><!--panel-->

<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
  <li class="active"><a href="#ta_res" role="tab" data-toggle="tab">TA所分享的资料</a></li>
  <li><a href="#ta_talk" role="tab" data-toggle="tab">TA所开启的讨论</a></li>
  <li><a href="#ta_project" role="tab" data-toggle="tab">TA所参加的项目</a></li>
</ul>

<!-- Tab panes -->
<div class="tab-content">
  <div class="tab-pane active" id="ta_res">
<table class="table table-hover">
      <thead>
        <tr>
          <th>#</th>
          <th>资源名</th>
          <th>资源类别</th>
          <th>发布时间</th>
        </tr>
      </thead>
      <tbody>
      <volist name="ta_res" id="vo">
        <tr>
          <td>{$i}</td>
          <td><a href="{:u('/Home/Respage/'.$vo['id'])}">{$vo['name']}</a></td>
          <td>{:getResclassname($vo['class'])}</td>
          <td>{$vo['time']}</td>
        </tr>
      </tbody>
      </volist>
    </table>
  </div><!--ta_res-->
  <div class="tab-pane" id="ta_talk">
    <table class="table table-hover">
      <thead>
        <tr>
          <th>#</th>
          <th>标题</th>
          <th>所属节点</th>
          <th>开启时间</th>
        </tr>
      </thead>
      <tbody>
      <volist name="ta_talk" id="vo">
        <tr>
          <td>{$i}</td>
          <td><a href="{:u('/Home/Talkpage/'.$vo['id'])}">{$vo['title']}</a></td>
          <td>{:getTalkclassname($vo['class'])}</td>
          <td>{$vo['time']}</td>
        </tr>
      </tbody>
      </volist>
    </table>
  </div><!--ta_talk-->
  <div class="tab-pane" id="ta_project">
    <table class="table table-hover">
      <thead>
        <tr>
          <th>Project_ID</th>
          <th>名称</th>
          <th>身份</th>
        </tr>
      </thead>
      <tbody>
      <volist name="ta_project" id="vo">
        <tr>
          <td>{$vo['id']}</td>
          <td><a href="{:u('/Home/Project/'.$vo['id'])}">{$vo['name']}</a></td>
          <td>创始人</td>
        </tr>
      </tbody>
      </volist>
      <volist name="ta_project_member" id="vo">
        <tr>
          <td>{$vo['pid']}</td>
          <td><a href="{:u('/Home/Project/'.$vo['id'])}">{:getProjectname($vo['pid'])}</a></td>
          <td>{$vo['admin']?'管理员':'成员'}</td>
        </tr>
      </tbody>
      </volist>
    </table>
  </div><!--ta_project-->
</div>

</div><!--col-md-9-->

<div class="col-md-3" id="space_height"></div><!--col-md-3-->



</div><!--row-->
</div><!--container-->

</block>
